package containers;


import com.sun.org.apache.xerces.internal.xs.StringList;

import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

class Government implements Generator<String>{
	String[] foundation = ("strange women lying in ponds "+
	"distributing swords is no basis for a a system of "+
	"government").split(" ");
	private int index;

	@Override
	public String next() {
		return foundation[index++];
	}
}

public class CllectionDataTest {
	public static void main(String[] args){
		Set<String> set = new LinkedHashSet<String>(new CollectionData<String>(new Government(),15));
		System.out.println(set);
		set.addAll(CollectionData.list(new Government(),15));
		System.out.println(set);

		List<String> list = new LinkedList<String>(new CollectionData<String>(new Government(),15));
		System.out.println(list);
	}
}
